package the.broccoli.generator.engine.util;

import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import org.wisteria.framework.util.DateUtils;
import org.wisteria.framework.util.TextUtils;

import java.util.Collection;
import java.util.Date;

public class TemplateUtils {

    public static String currentTime() {
        return DateUtils.formatTime(new Date());
    }

    public static String firstUpperCase(String str) {
        return TextUtils.firstCharToUpperCase(str);
    }

    public static boolean hasText(String str) {
        return StringUtils.hasText(str);
    }

    public static boolean isNotEmpty(Collection<?> collection) {
        return !CollectionUtils.isEmpty(collection);
    }
}
